// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

namespace Elastic.Clients.Elasticsearch.Serverless.SnapshotLifecycleManagement;

public partial class SnapshotLifecycleManagementNamespacedClient : NamespacedClientProxy
{
	/// <summary>
	/// <para>Initializes a new instance of the <see cref="SnapshotLifecycleManagementNamespacedClient"/> class for mocking.</para>
	/// </summary>
	protected SnapshotLifecycleManagementNamespacedClient() : base()
	{
	}

	internal SnapshotLifecycleManagementNamespacedClient(ElasticsearchClient client) : base(client)
	{
	}

	/// <summary>
	/// <para>Deletes an existing snapshot lifecycle policy.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-delete-policy.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteLifecycleResponse> DeleteLifecycleAsync(DeleteLifecycleRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<DeleteLifecycleRequest, DeleteLifecycleResponse, DeleteLifecycleRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>Deletes an existing snapshot lifecycle policy.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-delete-policy.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteLifecycleResponse> DeleteLifecycleAsync(DeleteLifecycleRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteLifecycleRequestDescriptor, DeleteLifecycleResponse, DeleteLifecycleRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Deletes an existing snapshot lifecycle policy.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-delete-policy.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteLifecycleResponse> DeleteLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.Name policyId, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteLifecycleRequestDescriptor(policyId);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteLifecycleRequestDescriptor, DeleteLifecycleResponse, DeleteLifecycleRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Deletes an existing snapshot lifecycle policy.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-delete-policy.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<DeleteLifecycleResponse> DeleteLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.Name policyId, Action<DeleteLifecycleRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new DeleteLifecycleRequestDescriptor(policyId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<DeleteLifecycleRequestDescriptor, DeleteLifecycleResponse, DeleteLifecycleRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Immediately creates a snapshot according to the lifecycle policy, without waiting for the scheduled time.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-lifecycle.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ExecuteLifecycleResponse> ExecuteLifecycleAsync(ExecuteLifecycleRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<ExecuteLifecycleRequest, ExecuteLifecycleResponse, ExecuteLifecycleRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>Immediately creates a snapshot according to the lifecycle policy, without waiting for the scheduled time.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-lifecycle.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ExecuteLifecycleResponse> ExecuteLifecycleAsync(ExecuteLifecycleRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<ExecuteLifecycleRequestDescriptor, ExecuteLifecycleResponse, ExecuteLifecycleRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Immediately creates a snapshot according to the lifecycle policy, without waiting for the scheduled time.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-lifecycle.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ExecuteLifecycleResponse> ExecuteLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.Name policyId, CancellationToken cancellationToken = default)
	{
		var descriptor = new ExecuteLifecycleRequestDescriptor(policyId);
		descriptor.BeforeRequest();
		return DoRequestAsync<ExecuteLifecycleRequestDescriptor, ExecuteLifecycleResponse, ExecuteLifecycleRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Immediately creates a snapshot according to the lifecycle policy, without waiting for the scheduled time.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-lifecycle.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ExecuteLifecycleResponse> ExecuteLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.Name policyId, Action<ExecuteLifecycleRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new ExecuteLifecycleRequestDescriptor(policyId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<ExecuteLifecycleRequestDescriptor, ExecuteLifecycleResponse, ExecuteLifecycleRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Deletes any snapshots that are expired according to the policy's retention rules.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-retention.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ExecuteRetentionResponse> ExecuteRetentionAsync(ExecuteRetentionRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<ExecuteRetentionRequest, ExecuteRetentionResponse, ExecuteRetentionRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>Deletes any snapshots that are expired according to the policy's retention rules.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-retention.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ExecuteRetentionResponse> ExecuteRetentionAsync(ExecuteRetentionRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<ExecuteRetentionRequestDescriptor, ExecuteRetentionResponse, ExecuteRetentionRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Deletes any snapshots that are expired according to the policy's retention rules.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-retention.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ExecuteRetentionResponse> ExecuteRetentionAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new ExecuteRetentionRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<ExecuteRetentionRequestDescriptor, ExecuteRetentionResponse, ExecuteRetentionRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Deletes any snapshots that are expired according to the policy's retention rules.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-execute-retention.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<ExecuteRetentionResponse> ExecuteRetentionAsync(Action<ExecuteRetentionRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new ExecuteRetentionRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<ExecuteRetentionRequestDescriptor, ExecuteRetentionResponse, ExecuteRetentionRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Retrieves one or more snapshot lifecycle policy definitions and information about the latest snapshot attempts.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-policy.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetLifecycleResponse> GetLifecycleAsync(GetLifecycleRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetLifecycleRequest, GetLifecycleResponse, GetLifecycleRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>Retrieves one or more snapshot lifecycle policy definitions and information about the latest snapshot attempts.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-policy.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetLifecycleResponse> GetLifecycleAsync(GetLifecycleRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetLifecycleRequestDescriptor, GetLifecycleResponse, GetLifecycleRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Retrieves one or more snapshot lifecycle policy definitions and information about the latest snapshot attempts.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-policy.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetLifecycleResponse> GetLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.Names? policyId, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetLifecycleRequestDescriptor(policyId);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetLifecycleRequestDescriptor, GetLifecycleResponse, GetLifecycleRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Retrieves one or more snapshot lifecycle policy definitions and information about the latest snapshot attempts.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-policy.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetLifecycleResponse> GetLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.Names? policyId, Action<GetLifecycleRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetLifecycleRequestDescriptor(policyId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetLifecycleRequestDescriptor, GetLifecycleResponse, GetLifecycleRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Retrieves one or more snapshot lifecycle policy definitions and information about the latest snapshot attempts.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-policy.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetLifecycleResponse> GetLifecycleAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new GetLifecycleRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<GetLifecycleRequestDescriptor, GetLifecycleResponse, GetLifecycleRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Retrieves one or more snapshot lifecycle policy definitions and information about the latest snapshot attempts.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-policy.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetLifecycleResponse> GetLifecycleAsync(Action<GetLifecycleRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetLifecycleRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetLifecycleRequestDescriptor, GetLifecycleResponse, GetLifecycleRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Returns global and policy-level statistics about actions taken by snapshot lifecycle management.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/slm-api-get-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetStatsResponse> GetStatsAsync(GetStatsRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetStatsRequest, GetStatsResponse, GetStatsRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>Returns global and policy-level statistics about actions taken by snapshot lifecycle management.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/slm-api-get-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetStatsResponse> GetStatsAsync(GetStatsRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetStatsRequestDescriptor, GetStatsResponse, GetStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Returns global and policy-level statistics about actions taken by snapshot lifecycle management.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/slm-api-get-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetStatsResponse> GetStatsAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new GetStatsRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<GetStatsRequestDescriptor, GetStatsResponse, GetStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Returns global and policy-level statistics about actions taken by snapshot lifecycle management.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/master/slm-api-get-stats.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetStatsResponse> GetStatsAsync(Action<GetStatsRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetStatsRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetStatsRequestDescriptor, GetStatsResponse, GetStatsRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Retrieves the status of snapshot lifecycle management (SLM).</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-status.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetSlmStatusResponse> GetStatusAsync(GetSlmStatusRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<GetSlmStatusRequest, GetSlmStatusResponse, GetSlmStatusRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>Retrieves the status of snapshot lifecycle management (SLM).</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-status.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetSlmStatusResponse> GetStatusAsync(GetSlmStatusRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<GetSlmStatusRequestDescriptor, GetSlmStatusResponse, GetSlmStatusRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Retrieves the status of snapshot lifecycle management (SLM).</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-status.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetSlmStatusResponse> GetStatusAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new GetSlmStatusRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<GetSlmStatusRequestDescriptor, GetSlmStatusResponse, GetSlmStatusRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Retrieves the status of snapshot lifecycle management (SLM).</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-get-status.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<GetSlmStatusResponse> GetStatusAsync(Action<GetSlmStatusRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new GetSlmStatusRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<GetSlmStatusRequestDescriptor, GetSlmStatusResponse, GetSlmStatusRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Creates or updates a snapshot lifecycle policy.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-put-policy.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutLifecycleResponse> PutLifecycleAsync(PutLifecycleRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<PutLifecycleRequest, PutLifecycleResponse, PutLifecycleRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>Creates or updates a snapshot lifecycle policy.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-put-policy.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutLifecycleResponse> PutLifecycleAsync(PutLifecycleRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<PutLifecycleRequestDescriptor, PutLifecycleResponse, PutLifecycleRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Creates or updates a snapshot lifecycle policy.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-put-policy.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutLifecycleResponse> PutLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.Name policyId, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutLifecycleRequestDescriptor(policyId);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutLifecycleRequestDescriptor, PutLifecycleResponse, PutLifecycleRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Creates or updates a snapshot lifecycle policy.</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-put-policy.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<PutLifecycleResponse> PutLifecycleAsync(Elastic.Clients.Elasticsearch.Serverless.Name policyId, Action<PutLifecycleRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new PutLifecycleRequestDescriptor(policyId);
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<PutLifecycleRequestDescriptor, PutLifecycleResponse, PutLifecycleRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Turns on snapshot lifecycle management (SLM).</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-start.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StartSlmResponse> StartAsync(StartSlmRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<StartSlmRequest, StartSlmResponse, StartSlmRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>Turns on snapshot lifecycle management (SLM).</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-start.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StartSlmResponse> StartAsync(StartSlmRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<StartSlmRequestDescriptor, StartSlmResponse, StartSlmRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Turns on snapshot lifecycle management (SLM).</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-start.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StartSlmResponse> StartAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new StartSlmRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<StartSlmRequestDescriptor, StartSlmResponse, StartSlmRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Turns on snapshot lifecycle management (SLM).</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-start.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StartSlmResponse> StartAsync(Action<StartSlmRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new StartSlmRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<StartSlmRequestDescriptor, StartSlmResponse, StartSlmRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Turns off snapshot lifecycle management (SLM).</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-stop.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StopSlmResponse> StopAsync(StopSlmRequest request, CancellationToken cancellationToken = default)
	{
		request.BeforeRequest();
		return DoRequestAsync<StopSlmRequest, StopSlmResponse, StopSlmRequestParameters>(request, cancellationToken);
	}

	/// <summary>
	/// <para>Turns off snapshot lifecycle management (SLM).</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-stop.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StopSlmResponse> StopAsync(StopSlmRequestDescriptor descriptor, CancellationToken cancellationToken = default)
	{
		descriptor.BeforeRequest();
		return DoRequestAsync<StopSlmRequestDescriptor, StopSlmResponse, StopSlmRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Turns off snapshot lifecycle management (SLM).</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-stop.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StopSlmResponse> StopAsync(CancellationToken cancellationToken = default)
	{
		var descriptor = new StopSlmRequestDescriptor();
		descriptor.BeforeRequest();
		return DoRequestAsync<StopSlmRequestDescriptor, StopSlmResponse, StopSlmRequestParameters>(descriptor, cancellationToken);
	}

	/// <summary>
	/// <para>Turns off snapshot lifecycle management (SLM).</para>
	/// <para><see href="https://www.elastic.co/guide/en/elasticsearch/reference/current/slm-api-stop.html">Learn more about this API in the Elasticsearch documentation.</see></para>
	/// </summary>
	public virtual Task<StopSlmResponse> StopAsync(Action<StopSlmRequestDescriptor> configureRequest, CancellationToken cancellationToken = default)
	{
		var descriptor = new StopSlmRequestDescriptor();
		configureRequest?.Invoke(descriptor);
		descriptor.BeforeRequest();
		return DoRequestAsync<StopSlmRequestDescriptor, StopSlmResponse, StopSlmRequestParameters>(descriptor, cancellationToken);
	}
}